package com.sixfoot.adminsys.utilities;

import com.sixfoot.adminsys.Main;

import javax.swing.*;

/**
 * 业务
 *
 * @author zhangjunjie | 2016-09-27
 */
public class UIUtils {

    /**
     * 错误提示
     *
     * @param msg
     */
    public static void showError(String msg) {
        JOptionPane.showMessageDialog(null, msg, "错误", JOptionPane.ERROR_MESSAGE);
    }

    /**
     * 警告提示
     *
     * @param msg
     */
    public static void showWarning(String msg) {
        JOptionPane.showMessageDialog(null, msg, "警告", JOptionPane.WARNING_MESSAGE);
    }

    /**
     * 信息提示
     *
     * @param msg
     */
    public static void showInfo(String msg) {
        JOptionPane.showMessageDialog(null, msg, "信息", JOptionPane.INFORMATION_MESSAGE);
    }

    public static Object getBean (String beanName) {
        return Main.ac.getBean(beanName);
    }
}
